package com.fjd.mapper;

import com.fjd.entity.MiniMall;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MinimallMapper {

    @Select("select merchandise_id from minimall where customer_id = #{anchorId}")
    List<String> getByAnchorId(String anchorId);

    @Insert("insert into minimall (id, customer_id, merchandise_id) VALUES (#{id},#{customerId},#{merchandiseId})")
    void insert(MiniMall miniMall);

    void deleteByMerchandiseIds(List<String> merchandiseIds, String anchorId);
}
